package com.kefu.chat.vo;

import javax.validation.constraints.NotEmpty;

import com.kefu.chat.model.ChatLeaveMsg;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractUpdateVo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;


@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "在线留言")
public class ChatLeaveMsgUpdateVo extends AbstractUpdateVo<ChatLeaveMsg,String> {

    
	@NotEmpty
    @ApiModelProperty(value = "主键")
    private String msgId;
    @ApiModelProperty(value = "留言状态 0=未处理，1=已处理")
    private Integer msgState;
    @ApiModelProperty(value = "留言类型 0=无效留言，1=有效留言")
    private Integer msgType;
    @ApiModelProperty(value = "备注")
    private String msgDesc;


    @Override
    public ChatLeaveMsg convert() {
        ChatLeaveMsg info = new ChatLeaveMsg();
        info.setMsgState(msgState);
        info.setMsgType(msgType);
        info.setMsgDesc(msgDesc);
        info.setMsgId(msgId);
        info.setUpdateUser(KefuContext.getUid());
        info.setUpdateTime(System.currentTimeMillis());
        return info;
	}
}